/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgMemberReport extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgMemberReport";
	public static final String ALIAS_RID = "rid";
	public static final String ALIAS_FROM_MEMBER_ID = "fromMemberId";
	public static final String ALIAS_TO_MEMBER_ID = "toMemberId";
	public static final String ALIAS_REASON = "reason";
	public static final String ALIAS_CREATE_DATE = "createDate";
	
	//date formats
	public static final String FORMAT_CREATE_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * rid       db_column: rid 
     */	
	
	private java.lang.Integer rid;
    /**
     * fromMemberId       db_column: fromMemberId 
     */	
	
	private java.lang.Integer fromMemberId;
    /**
     * toMemberId       db_column: toMemberId 
     */	
	
	private java.lang.Integer toMemberId;
    /**
     * reason       db_column: reason 
     */	
	private java.lang.String reason;
    /**
     * createDate       db_column: createDate 
     */	
	
	private java.util.Date createDate;
	//columns END

	public SmgMemberReport(){
	}

	public SmgMemberReport(
		java.lang.Integer rid
	){
		this.rid = rid;
	}

	public void setRid(java.lang.Integer value) {
		this.rid = value;
	}
	
	public java.lang.Integer getRid() {
		return this.rid;
	}
	public void setFromMemberId(java.lang.Integer value) {
		this.fromMemberId = value;
	}
	
	public java.lang.Integer getFromMemberId() {
		return this.fromMemberId;
	}
	public void setToMemberId(java.lang.Integer value) {
		this.toMemberId = value;
	}
	
	public java.lang.Integer getToMemberId() {
		return this.toMemberId;
	}
	public void setReason(java.lang.String value) {
		this.reason = value;
	}
	
	public java.lang.String getReason() {
		return this.reason;
	}
	public String getCreateDateString() {
		return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
	}
	public void setCreateDateString(String value) {
		setCreateDate(DateConvertUtils.parse(value, FORMAT_CREATE_DATE,java.util.Date.class));
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Rid",getRid())
			.append("FromMemberId",getFromMemberId())
			.append("ToMemberId",getToMemberId())
			.append("Reason",getReason())
			.append("CreateDate",getCreateDate())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getRid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgMemberReport == false) return false;
		if(this == obj) return true;
		SmgMemberReport other = (SmgMemberReport)obj;
		return new EqualsBuilder()
			.append(getRid(),other.getRid())
			.isEquals();
	}
}

